<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">



<h:head>
	<style>
.ui-widget,.ui-widget .ui-widget {
	font-size: 11px !important;
}
</style>
	<title>Consultar Cidade</title>
	<link rel="stylesheet" type="text/css" href="css/estilos.css" />
</h:head>
<body>
	<p:messages id="messages" showDetail="false" autoUpdate="true"
		closable="true" />
	<h:form id="cPaisForm">
		<p:panel id="cPaisPanel" style="border: none;">
			<h2>Consultar Pais</h2>
			<h:panelGrid columns="4" cellpadding="2" style="border: 2px;">
				<h:outputText value="Código" />
				<h:outputText value="Pais" />
				<h:outputText value="DDI" />
				<h:outputText value="" />

				<p:inputText id="cPaisCodigo" value="#{beanPais.filtro.id}"
					maxlength="4" size="7" />
				<p:inputText id="cPaisPais" value="#{beanPais.filtro.pais}"
					size="78" />
				<p:inputText id="cPaisDdi" value="#{beanPais.filtro.ddi}" size="7" />
				<p:commandButton id="cPaisFind" value="Buscar" icon="ui-icon-search"
					action="#{beanPais.find}" update="cPaisTabelaPais" />
			</h:panelGrid>

			<br></br>
			<p:separator />

			<p:dataTable var="pais" value="#{beanPais.paises}" size="200"
				id="cPaisTabelaPais">
				<p:column headerText="Codigo" width="40">
					<h:outputText value="#{pais.id}" />
				</p:column>

				<p:column headerText="Pais">
					<h:outputText value="#{pais.pais}" />
				</p:column>

				<p:column headerText="DDI" width="40">
					<h:outputText value="#{pais.ddi}" />
				</p:column>

				<p:column headerText="Sigla" width="40">
					<h:outputText value="#{pais.sigla}" />
				</p:column>

				<p:column headerText="Editar" width="10">
					<p:commandButton action="manterPais" icon="ui-icon-search"
						title="View">
						<f:setPropertyActionListener value="#{pais}"
							target="#{beanPais.pais}" />
					</p:commandButton>
				</p:column>
				<p:column headerText="Excluir" width="10">
					<p:commandButton action="#{beanPais.remove}" icon="ui-icon-trash"
						title="Excluir Pais" update="@form">
						<f:setPropertyActionListener value="#{pais}"
							target="#{beanPais.selected}" />
					</p:commandButton>
				</p:column>
			</p:dataTable>

			<p:separator />
			<br></br>

			<h:panelGrid columns="3" style="float: right;">
				<p:commandButton id="cPaisNovo" value="Novo" action="manterPais" />
				<p:commandButton id="cPaisLimpar" value="Limpar" />
				<p:commandButton id="cPaisVoltar" value="Voltar" />
			</h:panelGrid>

		</p:panel>

	</h:form>

</body>
</html>